<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<HitchHikersGuideToTheGalaxy.Models.Tour>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Edit</h2>

    <%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>

    <% using (Html.BeginForm()) {%>

        <fieldset>
            <legend>Fields</legend>
            <p>
                <label for="Id">Id:</label>
                <%= Html.TextBox("Id", Model.Id) %>
                <%= Html.ValidationMessage("Id", "*") %>
            </p>
            <p>
                <label for="DestinationIdTo">DestinationIdTo:</label>
                <%= Html.TextBox("DestinationIdTo", Model.DestinationIdTo) %>
                <%= Html.ValidationMessage("DestinationIdTo", "*") %>
            </p>
            <p>
                <label for="DestinationIdFrom">DestinationIdFrom:</label>
                <%= Html.TextBox("DestinationIdFrom", Model.DestinationIdFrom) %>
                <%= Html.ValidationMessage("DestinationIdFrom", "*") %>
            </p>
            <p>
                <label for="Time">Time:</label>
                <%= Html.TextBox("Time", String.Format("{0:g}", Model.Time)) %>
                <%= Html.ValidationMessage("Time", "*") %>
            </p>
            <p>
                <label for="VehicleDriverId">VehicleDriverId:</label>
                <%= Html.TextBox("VehicleDriverId", Model.VehicleDriverId) %>
                <%= Html.ValidationMessage("VehicleDriverId", "*") %>
            </p>
            <p>
                <label for="SmokingAllowed">SmokingAllowed:</label>
                <%= Html.TextBox("SmokingAllowed", Model.SmokingAllowed) %>
                <%= Html.ValidationMessage("SmokingAllowed", "*") %>
            </p>
            <p>
                <label for="PetAllowed">PetAllowed:</label>
                <%= Html.TextBox("PetAllowed", Model.PetAllowed) %>
                <%= Html.ValidationMessage("PetAllowed", "*") %>
            </p>
            <p>
                <label for="AvailableSeats">AvailableSeats:</label>
                <%= Html.TextBox("AvailableSeats", Model.AvailableSeats) %>
                <%= Html.ValidationMessage("AvailableSeats", "*") %>
            </p>
            <p>
                <label for="Distance">Distance:</label>
                <%= Html.TextBox("Distance", String.Format("{0:F}", Model.Distance)) %>
                <%= Html.ValidationMessage("Distance", "*") %>
            </p>
            <p>
                <label for="Cost">Cost:</label>
                <%= Html.TextBox("Cost", String.Format("{0:F}", Model.Cost)) %>
                <%= Html.ValidationMessage("Cost", "*") %>
            </p>
            <p>
                <label for="ModifiedTime">ModifiedTime:</label>
                <%= Html.TextBox("ModifiedTime", String.Format("{0:g}", Model.ModifiedTime)) %>
                <%= Html.ValidationMessage("ModifiedTime", "*") %>
            </p>
            <p>
                <label for="CreatedTime">CreatedTime:</label>
                <%= Html.TextBox("CreatedTime", String.Format("{0:g}", Model.CreatedTime)) %>
                <%= Html.ValidationMessage("CreatedTime", "*") %>
            </p>
            <p>
                <label for="Route">Route:</label>
                <%= Html.TextBox("Route", Model.Route) %>
                <%= Html.ValidationMessage("Route", "*") %>
            </p>
            <p>
                <label for="Note">Note:</label>
                <%= Html.TextBox("Note", Model.Note) %>
                <%= Html.ValidationMessage("Note", "*") %>
            </p>
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%=Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent2" runat="server">
    <% Html.RenderPartial("UpcomingToursPartial", ViewData["UpcomingTours"]); %>
</asp:Content>

